<template>
	<view class="goods_list">
		<view class="goods_item" v-for="item in goods" :key="item.goodsId" @click="navigator(item.goodsId)">
			<image mode="aspectFill" :src="item.pic"></image>
			<view class="price">
				<text>￥{{item.price}}</text>
				<text>￥{{item.oriPrice}}</text>
			</view>
			<view class="name">
				{{item.goodsName}} 
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: ['goods'],
		methods: {
			navigator(goodsId) {
				this.$emit('goodsItemClick', goodsId)
			}
		}
	}
</script>

<style lang="scss">
	@import './goods-list.scss'
</style>
